//package com.chen;
//
//import org.swift.util.http.WebClient;
//
//import com.google.gson.JsonObject;
//import com.google.gson.JsonParser;
//
//import action.BaseDispatchAction;
//
//public class TestGetTokenAction2 extends BaseDispatchAction{
//	private static final long serialVersionUID = -7818255020189659445L;
//
//	public void getToken() throws Exception{
//		String appid = "wxdc0adea466f979df";
//		String secret = "036c35b2e7fcfced379ec1b7f3982aa3";
//		String tokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid
//				+ "&secret=" + secret;
//		String tokenFrom = WebClient.retrieveWebContent(tokenUrl);
//		JsonObject returnData = new JsonParser().parse(tokenFrom).getAsJsonObject();
//		String token = returnData.get("access_token").getAsString();
//		System.out.println("token="+ token);
//		String tokenJson = "{\"data\": \""+token+"\"}";
//		response.getWriter().print(tokenJson);
//	}
//}
